<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>积分榜</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <!--<link rel="stylesheet" type="text/css" href="/plugins/bootstrap/css/bootstrap.css">-->
    <!--<link rel="stylesheet" href="//cdn.bootcss.com/zui/1.8.1/css/zui.min.css">-->

    <style type="text/css">
        .status1{
            display: block;
            width: 45px;
            text-align: center;
            color: #fff;
            background: #3276c5;
            overflow: hidden;
        }
        .status2{
            display: block;
            width: 45px;
            text-align: center;
            color: #fff;
            background: #bbb;
            overflow: hidden;
        }
        .content{
            display: block;
            float: left;
        }
        .field{
            display: block;
            float: left;
        }
        .logo{
            width: 28px;
            text-align: center;
        }
        .guest_team{
            width: 52px;
            padding-right: 8px;
            text-align: right;
        }
        .score{
            width: 58px;
            text-align: center;
        }
        .home_team{
            padding: 0 0 0 8px;
            width: 52px;
            text-align: left;
        }
    </style>
</head>


<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin layui-bg-blue">
    <!-- 头部区域 -->
    <div th:replace="index::topbar"></div>

    <!-- 左侧导航区域 -->
    <div th:replace="index::sidebar"></div>

    <!-- 底部固定区域 -->
    <div th:replace="index::bottombar"></div>

    <!-- 内容主体区域 -->
    <div class="layui-body">
        <div class="layui-tab layui-tab-brief" lay-filter="display">
            <label class="layui-form-label" style="font-size: large">显示形式</label>
            <ul class="layui-tab-title">
                <li class="layui-this">表格形式显示</li>
                <li>时间线形式显示</li>
            </ul>
            <div class="layui-tab-content">
                <!--表格形式显示-->
                <div class="layui-tab-item layui-show">
                    <table class="layui-table">
                        <colgroup>
                            <col width="5%">
                            <col width="10%">
                            <col width="20%">
                            <col width="10%">
                            <col width="15%">
                            <col width="10%">
                            <col width="15%">
                            <col width="15%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>比赛状态</th>
                            <th>比赛双方</th>
                            <th>比赛轮次</th>
                            <th>比赛日期</th>
                            <th>裁判</th>
                            <th>比赛场地</th>
                            <th>比赛城市</th>
                            <th></th>
                        </tr>
                        </thead>
                        <!--以下使用thymeleaf模板从数据库中遍历获取数据-->
                        <tbody>
                        <tr th:each="matchInformation:${matchInformations}">
                            <td th:text="${matchInformation.id}"></td>
                            <td th:text="${matchInformation.state}"></td>
                            <td>
                                <span class="guest_team" th:text="${matchInformation.guestTeam}"></span>
                                <span class="logo"></span>
                                <span class="score"> VS </span>
                                <span class="logo"></span>
                                <span class="home_team" th:text="${matchInformation.homeTeam}"></span>
                            </td>
                            <td th:text="${matchInformation.round}"></td>
                            <td th:text="${matchInformation.matchDate}"></td>
                            <td th:text="${matchInformation.referee}"></td>
                            <td th:text="${matchInformation.field}"></td>
                            <td th:text="${matchInformation.city}"></td>
                            <td>
                                <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail" th:href="@{displayMatchInformation(id=${matchInformation.id})}">查看</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <!--时间线形式显示-->
                <div class="layui-tab-item">
                    <!--时间线模块-->
                    <ul class="layui-timeline">
                        <!--每个时间线-->
                        <li class="layui-timeline-item" th:each="matchInformation:${matchInformations}">
                            <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                            <div class="layui-timeline-content layui-text">
                                <h3 class="layui-timeline-title" th:text="${matchInformation.matchDate}"></h3>
                                <p>
                                    <tr>
                                        <td><span class="status1" th:text="${matchInformation.state}"></span></td>
                                        <td class="content">
                                            <span class="guest_team" th:text="${matchInformation.guestTeam}"></span>
                                            <span class="logo"></span>
                                            <span class="score"> VS </span>
                                            <span class="logo"></span>
                                            <span class="home_team" th:text="${matchInformation.homeTeam}"></span>
                                        </td>
                                    </tr>
                                </p>
                            </div>
                        </li>

                    </ul>
                </div>
            </div>
        </div>

    </div>
</div>

<!-- 修改密码弹窗 -->
<script type="text/html" id="pswModel1">
    <div id="pswModel" th:replace="index::changePsw">
    </div>
</script>

</body>

<script src="/plugins/layui/layui.js"></script>
<script type="text/javascript" src="/js/jquery.js"></script>

<script>
    layui.use('form', function(){
        var form = layui.form;

        //各种基于事件的操作，下面会有进一步介绍
    });

    //点击事件
    layui.use('element', function(){
        var element = layui.element;

    });

    //显示个人信息
    function info() {
        layui.use(['layer'], function(){
            var layer = layui.layer;
            layer.open({
                type:1,
                title:'个人信息',
                area:'350px',
                offset:'120px',
                content:'<ul style="padding:25px 35px 8px 35px;">' +
                '<li>用户名：[[${session.loginUser}]]</li>'+
                '<li>手机号：13657936306</li>'+
                '</ul>',
                btn:['确定'],
                btnAlign:'center'
            });
        });
    }

    //修改密码
    function changePassword() {
        layui.use(['layer'],function () {
            var layer=layui.layer;
            layer.open({
                type: 1,
                title: "修改密码",
                area: '400px',
                offset: '120px',
                content: $("#pswModel1").html()
            });
        })
    }

</script>
</html>